<template>
	<div>
		<input type="text" v-model="inputValue">
		<button @click="handleClick">更改</button>
	</div>
</template>
<script>
export default {
	name:'HeaderComponent',
	data(){
		return{
			inputValue:''
		}
	},
	methods:{
		handleClick(){
			this.$store.commit('newAuthor',this.inputValue);
			this.inputValue=''
		}
	}
}
</script>
